package com.hbt.feature_consumer.service;

import com.hbt.api.entity.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("feature-provider")
public interface FeatureFeign {
    String pre = "feature_provider/";

    @PostMapping(pre+"del_feature")
    public CommonResult<String> delFeature(@RequestParam("descript") String descript, @RequestParam("wordid") int wordid);

    @PostMapping(pre+"add_feature")
    public CommonResult<String> addFeature(@RequestParam("descript") String descript, @RequestParam("wordid") int wordid);

    @RequestMapping(pre+"changeSysFeatures")
    public int changeSysFeatures(@RequestParam("features") List<String> features, @RequestParam("userid") int userid);

    @RequestMapping(pre+"getSysFeatures")
    public List<String> getSysFeatures(@RequestParam("userid") int userid);

}
